/**
 * Created by xingkaihang on 2017/5/24.
 */

//显示防盗图
export const showImg = (url) => {
    let imgid = Math.random();
    let frameid = 'frameimg' + imgid;
    window['img' + imgid] = '<img id="img" src=\'' + url + '?kilobug\' /><script>window.onload = function() { parent.document.getElementById(\'' + frameid + '\').height = document.getElementById(\'img\').height+\'px\'; }<' + '/script>';
    return '<iframe id="' + frameid + '" src="javascript:parent[\'img' + imgid + '\'];" frameBorder="0" scrolling="no" width="100%"></iframe>'
}